Do not mark injected properties as private when moved to constructor#1711
Conversation
…uctor-based injection
|
What about classes with no children? |
|
As mentioned here #1400 (comment), I do not think "detecting" this is the responsibility of this rector...? Better to have a lot of small and focussed rectors and let them work together, right? |
|
Great approach and usually I'd agree. I try to look at this from users perspective - what would they change in code at one go? |
|
Well, from my user-perspective: in case I have marked my Of course, in case rector can determine properly that the visibility can be set to In case it is possible for rector to determine whether:
=> then this could be added. But I "assumed" this would be possibly get quite complex? |
|
I see. Thanks for explaning your point of view. It helped me to improve my pespective :) Let's try your idea and see how it goes. |
|
Thanks for the PR! |
rectorphp/rector-src@cb96224 [DowngradePhp70][Transform] Add #[\ReturnTypeWillChange] on Downgrade + transform ArrayObject::getIterator() to keep working on php 8.1 (#1711)
As suggested in #1400 (comment)